<?php
require_once ("../dao/CardLevelDAO.php");
$action = $_POST['act'];
if($action == 'del') {
	$result = false;
	if(isset($_POST['idre'])) {
		$id = $_POST['idre'];
		if(deleteCardLevel($id)) {
			$result = true;
		}
	}
	echo json_encode($result);
} else if($action == "getall") {
	$result = getCardLevels();
	echo json_encode($result);
}
?>